<!DOCTYPE html>
<html class="x-admin-sm">

<head>
    <meta charset="UTF-8">
    <title>客服信息录入</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport"
          content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi"/>
    <link rel="stylesheet" href="../../css/font.css">
    <link rel="stylesheet" href="../../css/xadmin.css">
    <script type="text/javascript" src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>
    <script type="text/javascript" src="../../lib/layui/layui.js" charset="utf-8"></script>
    <script type="text/javascript" src="../../js/xadmin.js"></script>
    <script type="text/javascript" src="../../js/cookie.js"></script>
    <!-- 让IE8/9支持媒体查询，从而兼容栅格 -->
    <!--[if lt IE 9]>
    <script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
    <script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
    <style>
        .layui-textarea {
            width: 50%;
        }
        .layui-form-item{

        }
    </style>
</head>

<body>
<form class="layui-form" action="localhost:8080/Tuihuo.do">
    <div class="layui-form-item">
        <input type="radio" name="cause" value="货物滞留" title="货物滞留:">
        <input type="radio" name="cause" value="重新配送" title="重新配送:">
        <input type="radio" name="cause" value="用户自提" title="用户自提:">
        <input type="radio" name="cause" value="其他情况" title="其他情况:">
        <input type="radio" name="cause" value="订单完成" title="订单完成:">
        <textarea name="tuihuo_bz"   placeholder="详细信息描述" class="layui-textarea"></textarea>
    </div>


    <div class="layui-form-item">
        <div class="layui-input-block">
            <button class="layui-btn" lay-submit lay-filter="formDemo">立即提交</button>
            <button type="reset" class="layui-btn layui-btn-primary">重置</button>
        </div>
    </div>
</form>
<script>
    //Demo
    layui.use('form', function () {
        var form = layui.form;
        //监听提交
        form.on('submit(formDemo)', function (data) {
            layer.msg(JSON.stringify(data.field));
            $.ajax({
                url: "/Tuihuo.do",
                type: "post",
                data: data.field,
                contentTypeString: "application/json",
                dataType: "text",
                success: function (res) {
                    console.log(res);
                },
                error: function (e) {
                    console.log("error:", e);
                }
            });
            return false;
        });
    });
</script>
</body>
<style>

</style>
</html>